package com.example.yls.demoa;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by yls on 2018/6/10.
 */

public class Notesdb extends SQLiteOpenHelper{

    public static final String table_name = "notes";
    public static final String content = "content";
    public static final String path = "path";
    public static final String video = "video";
    public static final String id = "_id";
    public static final String time = "time";

    public Notesdb(Context context) {
        super(context, "notes", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL("create table " + table_name + " (" + id
                + " integer primary key autoincrement," + content
                + " text not null," + path + " text not null," + video
                + " text not null," + time + " text not null)");

    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
